package com.ahms.customer.controller;

import com.ahms.common.core.controller.BaseController;
import com.ahms.common.core.page.TableDataInfo;
import com.ahms.customer.domain.NewsCategory;
import com.ahms.customer.service.INewsCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 新闻分类Controller
 * 
 * @author 
 * @date 2025-04-09
 */
@RestController
@RequestMapping("/customer/category")
public class CustomerNewsCategoryController extends BaseController
{
    @Autowired
    private INewsCategoryService newsCategoryService;


    /**
     * 前台用户查询新闻分类列表
     */
    @GetMapping("/list")
    public TableDataInfo list(NewsCategory newsCategory)
    {
        System.out.println(newsCategory);
        startPage();
        List<NewsCategory> list = newsCategoryService.selectNewsCategoryList(newsCategory);
        return getDataTable(list);
    }
}
